package com.cipe.cmrs.model;

import java.util.List;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * <p>
 * Pojo mapping TABLE dbo.Donor
 * </p>
 * <p>
 * Generated at Sat Dec 03 14:39:41 PKT 2011
 * </p>
 * 
 * @author Incepio
 */
@Entity
@Table(name = "donor")
@SuppressWarnings("serial")
public class Donor extends BaseAuditEntity {

	/**
	 * Attribute address1.
	 */
	@Basic
	@Column(name = "address1", length = 50)
	private String				address1;
	/**
	 * Attribute address2.
	 */
	@Basic
	@Column(name = "address2", length = 50)
	private String				address2;
	/**
	 * Attribute city.
	 */
	@Basic
	@Column(name = "city", length = 50)
	private String				city;
	/**
	 * Attribute contactName.
	 */
	@Basic
	@Column(name = "contactname", length = 50)
	private String				contactName;
    @ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "state")
	private State				state;
	/**
	 * /** Attribute country
	 */
    @ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "countryid")
	private Country				country;
	/**
	 * Attribute donorAcronym.
	 */
	@Basic
	@Column(name = "donoracronym", length = 100)
	private String				donorAcronym;
	/**
	 * Attribute donorcode.
	 * FIXME
	 */
	@Transient
	private String				donorcode;
	
//	Hidden field for submit navigation
	@Transient
	private String submitAction;
	/**
	 * List of Donoraward
	 */
	@OneToMany(mappedBy = "donor")
	private List<Donoraward>	donorawards	= null;
	/**
	 * Attribute donorName.
	 */
	@Basic
	@Column(name = "donorname", length = 100)
	private String				donorName;
	/**
	 * Attribute email.
	 */
	@Basic
	@Column(name = "contactemail", length = 100)
	private String				email;
	/**
	 * Attribute fax.
	 */
	@Basic
	@Column(name = "contactfax", length = 100)
	private String				fax;
	/**
	 * Attribute phone.
	 */
	@Basic
	@Column(name = "contactphone", length = 100)
	private String				phone;
	/**
	 * Attribute state.
	 */
	/**
	 * Attribute url.
	 */
	@Basic
	@Column(name = "url", length = 400)
	private String				url;
	/**
	 * Attribute zipCode.
	 */
	@Basic
	@Column(name = "zipcode", length = 10)
	private String				zipCode;

	/**
	 * @return address1
	 */
	public String getAddress1() {
		return address1;
	}

	/**
	 * @return address2
	 */
	public String getAddress2() {
		return address2;
	}

	/**
	 * @return city
	 */
	public String getCity() {
		return city;
	}

	/**
	 * @return contactName
	 */
	public String getContactName() {
		return contactName;
	}

	public Country getCountry() {
		return country;
	}

	/**
	 * @return donorAcronym
	 */
	public String getDonorAcronym() {
		return donorAcronym;
	}

	public List<Donoraward> getDonorawards() {
		return donorawards;
	}

	public String getDonorcode() {
		return donorcode;
	}

	/**
	 * @return donorName
	 */
	public String getDonorName() {
		return donorName;
	}

	/**
	 * @return email
	 */
	public String getEmail() {
		return email;
	}

	/**
	 * @return fax
	 */
	public String getFax() {
		return fax;
	}

	/**
	 * @return phone
	 */
	public String getPhone() {
		return phone;
	}

	public State getState() {
		return state;
	}

	/**
	 * @return url
	 */
	public String getUrl() {
		return url;
	}

	/**
	 * @return zipCode
	 */
	public String getZipCode() {
		return zipCode;
	}

	/**
	 * @param address1
	 *            new value for address1
	 */
	public void setAddress1(String address1) {
		this.address1 = address1;
	}

	/**
	 * @param address2
	 *            new value for address2
	 */
	public void setAddress2(String address2) {
		this.address2 = address2;
	}

	/**
	 * @param city
	 *            new value for city
	 */
	public void setCity(String city) {
		this.city = city;
	}

	/**
	 * @param contactName
	 *            new value for contactName
	 */
	public void setContactName(String contactName) {
		this.contactName = contactName;
	}

	public void setCountry(Country country) {
		this.country = country;
	}

	/**
	 * @param donorAcronym
	 *            new value for donorAcronym
	 */
	public void setDonorAcronym(String donorAcronym) {
		this.donorAcronym = donorAcronym;
	}

	public void setDonorawards(List<Donoraward> donorawards) {
		this.donorawards = donorawards;
	}

	public void setDonorcode(String donorcode) {
		this.donorcode = donorcode;
	}

	/**
	 * @param donorName
	 *            new value for donorName
	 */
	public void setDonorName(String donorName) {
		this.donorName = donorName;
	}

	/**
	 * @param email
	 *            new value for email
	 */
	public void setEmail(String email) {
		this.email = email;
	}

	/**
	 * @param fax
	 *            new value for fax
	 */
	public void setFax(String fax) {
		this.fax = fax;
	}

	/**
	 * @param phone
	 *            new value for phone
	 */
	public void setPhone(String phone) {
		this.phone = phone;
	}

	public void setState(State state) {
		this.state = state;
	}

	/**
	 * @param url
	 *            new value for url
	 */
	public void setUrl(String url) {
		this.url = url;
	}

	/**
	 * @param zipCode
	 *            new value for zipCode
	 */
	public void setZipCode(String zipCode) {
		this.zipCode = zipCode;
	}

	public String getSubmitAction() {
		return submitAction;
	}

	public void setSubmitAction(String submitAction) {
		this.submitAction = submitAction;
	}
}